package com.xander.qqdatabase.mapper;

import com.xander.qqdatabase.entity.User;

/**
 * @author 叶振东
 * @date 2019-01-10
 */
public interface UserMapper {

    /**
     * 根据用户名获取用户
     * @param userId
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUserByUserId(String userId);

    /**
     * 根据用户名获取用户
     * @param username
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUserByUsername(String username);

    /**
     * 根据参数获取用户
     * @param user
     * @return User
     * @author yezhendong
     * @date 2019-01-10
     */
    User getUser(User user);

    /**
     * 注册
     * @param user
     * @return void
     * @author yezhendong
     * @date 2019-01-10
     */
    void insertUser(User user);
}
